import request from "@/utils/request";

export function getCalculateBatchDetailsList(params) {
  return request({
    url: `/tax/api/v1/calculateBatchDetails`,
    method: "GET",
    params
  });
}

export function getStartApprover(transferAccountsBatchId, flowId) {
  return request({
    url: `/hr/api/v1/transferAccountsBatches/startApprover/${transferAccountsBatchId}/${flowId}`,
    method: "GET"
  });
}

export function getAllByCompany(companyId, params) {
  return request({
    url: `/approval/api/v1/approFlows/allByCompany/${companyId}/${params.moduleType}`,
    method: "GET",
    params
  });
}

export function putTransferAccountsDetails(data) {
  return request({
    url: `/hr/api/v1/transferAccountsDetails`,
    method: "PUT",
    data
  });
}

export function delTransferAccountsDetails(transferAccountsDetailId) {
  return request({
    url: `/hr/api/v1/transferAccountsDetails/${transferAccountsDetailId}`,
    method: "DELETE"
  });
}

export function getCalculateBatchDetails(params) {
  return request({
    url: `/tax/api/v1/calculateBatchDetails/getBatchDetail`,
    method: "GET",
    params
  });
}

export function getActiveByType(params) {
  return request({
    url: `/tax/api/v1/requests/getActiveByType`,
    method: "GET",
    params
  });
}

export function calculateTaxFeedBack(data) {
  return request({
    url: `/tax/api/v1/calculateBatchDetails/calculateTaxFeedBack`,
    method: "POST",
    data
  });
}

export function deleteAndUpdateById(calculateBatchDetailId) {
  return request({
    url: `/tax/api/v1/calculateBatchDetails/deleteAndUpdateById/${calculateBatchDetailId}`,
    method: "DELETE"
  });
}
